package qf.sail.contents;

public enum CodeMsg {
    //处理成功
    SUCCESS(0,"success"),
    //登录错误
    NOT_ACCOUNT(1001,"用户不存在"),
    PASSWORD_ERR(1002,"密码错误"),
    //注册错误
    PHONE_NULL(1011,"用户名为空"),
    PASSWORD_NULL(1012,"密码为空"),
    HAVE_ACCOUNT(1013,"用户已注册"),
    REG_FAIL(1014,"注册失败请联系管理员"),
    //获取商品详情错误
    GET_GOOD_ERR(1021,"获取商品详情失败，请联系管理员"),
    //未登录
    NO_LOGIN(-1,"你还未登录,请先登录！"),
    //获取订单错误
    GET_ORDER_ERR(1031,"获取订单失败，请联系管理员"),
    //支付错误
    PAY_MONEY_ERR(1041,"支付金额有错"),
    PAY_TYPE_ERR(1042,"暂不支持这种支付方式");

    private int code; //错误码

    private String msg; //错误消息

    private CodeMsg(int code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
